<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="app" uri="/application" %>
<%@ taglib  prefix="s"  uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="/css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript"	src="/js/dialog/lhgdialog.min.js?v=${version}"></script>
<script type="text/javascript">
		/**
		 * 查信息
		 *	
		 **/
		function advInfo(advId){
			var url = "manage!findAdv.do?advId="+advId;
				new $.dialog({
					title:'查看信息',
					page:url,
					width:575,
					height:520,
					drag:true,
					resize:true,
					cover:true,
					maxBtn:false}).ShowDialog();
		}
</script>
</head>
<body>
<div id="all_main">
  <div class="head_main">
    <div class="main_nav">用户管理-&gt;用户提问列表</div>
    <div class="main_soso">
    <form action="/user/search_request_info.shtml">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
		    <td width="19" height="30" align="center"><img src="../images/clean_011.gif" width="16" height="16" /></td>
		    <td>
		               用户ID：<input name="requestInfo.userId" value="${requestInfo.userId}" type="text" size="8" style="width:80px;" class="inputwidth01" />     
		   
		      </td>
		    <td align="left">
		      <input name="input7" type="submit" class="input01" value="搜索" />
		    </td>
		  </tr>
		</table>
    </form>
    </div>
    <div class="main_title">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
     
          <th width="5%">用户ID</th>
          <th width="10%">用户昵称</th>
          <th width="5%">类型</th>      
          <th width="20%">问题</th>
          <th width="10%">时间 </th>      
          <th width="10%">会员id</th>
          <th width="10%">采纳回答</th>
          <th width="10%">选项</th>
          <th>操作</th>  
        </tr>
      </table>
    </div>
  </div>
  <div class="content_main">
    <table border="0" cellpadding="0" cellspacing="0" width="100%" id="background_hegh01">
      <c:forEach items="${page_list.list}" var="o">
	      <tr>
	         <td width="5%">${o.userId}</td>
	         <td width="10%">${o.nickName}</td>
	         <td width="5%">
	           <c:choose>
                  <c:when test="${o.type=='diaoc'}">调查</c:when>
                  <c:when test="${o.type=='tiw'}">提问</c:when>
               </c:choose>
	         </td>
	         <td width="20%">${o.question}</td>
	         <td width="10%"><fmt:formatDate pattern="yyyy-MM-dd" value="${o.createTime}"  /></td>        
	         <td width="10%">${o.sessionid}</td>
	         <td width="10%">${o.answerText}</td>
	         <td width="10%"> 
	         <c:choose>
                  <c:when test="${o.type=='diaoc'}"> <a href="javascript:void(0);" onclick="FW.op({height:430,url:'/user/to_option_list.shtml?id=${o.id}',title:'更多'})" style="width:80px;">更多</a></c:when>
                  <c:when test="${o.type=='tiw'}"> <a href="javascript:void(0);" onclick="FW.op({height:430,url:'/user/to_answer_info_list.shtml?id=${o.id}',title:'更多'})" style="width:80px;">更多</a></c:when>
               </c:choose>
	         </td>
	         <td><a href="javascript:deleteRequestInfo(${o.id})">删除</a></td>
	      </tr>
	      
      </c:forEach>
    </table>
  </div>
  <app:page></app:page>
</div>
</body>
</html>
<script type="text/javascript" src="/scripts/util.js"></script>
<script type="text/javascript" src="/scripts/page.js"></script>
<script type="text/javascript" src="/scripts/xhr.js"></script>
<script type="text/javascript" src="/scripts/common.js"></script>
<script type="text/javascript">
  
  function deleteRequestInfo(id){
	   if(confirm("确定删除此提问吗?")){
		    function cb(d){
	           window.location.reload();
	        }	 
	     new xhr('/user/delete_request_info.shtml',cb).setParameter("id",id).execute();
	   }
   }

</script>